/***********************************************************************
	filename: 	DaterRecUser.cpp
	created:	1/6/2012
	author:		4Ys
	
	purpose:	Implements classes to recover orders from server to client,
				specifically for User.	            
*************************************************************************/

#include "DaterRecUser.h"

namespace Dater
{
	std::vector<BriefUserInfo> RecUserSearch::execute()
	{
		int resultNumber;

		std::vector<BriefUserInfo> result;

		resultNumber = atoi(_splitedData[2].c_str());
		for(int index = 0; index < resultNumber; index++)
		{
			BriefUserInfo groupInfo;
			groupInfo.userID = atoi(_splitedData[3 + index * 4].c_str());
			groupInfo.userHypocorism = _splitedData[3 + index * 4 + 1];
			groupInfo.userGender = _splitedData[3 + index * 4 + 2];
			groupInfo.userBirthday = _splitedData[3 + index * 4 + 3];
			result.push_back(groupInfo);
		}

		return result;
	}
}